function getText1(): string | undefined {
  return 'bar';
}

function getText2(): string | null {
  return 'bar';
}

const foo1: string | undefined = getText1();
export const v1 = foo1 ?? 'a string';

const foo2: string | null = getText2();
export const v2 = foo2 ?? 'a string';

declare const x: any;
declare const y: number;
x || y;

declare const x: unknown;
declare const y: number;
x || y;

declare const x: never;
declare const y: number;
x || y;